﻿using Microsoft.CodeAnalysis.CSharp.Scripting;
using Microsoft.CodeAnalysis.Scripting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace Common.DynamicCode
{
    public class Evaluator
    {
        
        public async static Task<T> Execute<T>(string code)
        {
            return await CSharpScript.EvaluateAsync<T>(code);
        }
    }
}
